package com.ddwl.schema.bo.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author FuZhaohui
 */
@Setter
@Getter
@ApiModel(description = "分页Bo")
public class PageBo<T> {

    @NotNull(message = "起始页为空")
    @Min(value = 1, message = "起始页最小1")
    @ApiModelProperty(value = "当前页数", required = true, example = "1")
    private Integer page =1;

    @ApiModelProperty(value = "每页多少条", required = true, example = "10")
    private Integer pageSize =10;

    @ApiModelProperty(value = "排序字段")
    private String  sort;

    @ApiModelProperty(value = "默认降序")
    private boolean asc   = false;

    @ApiModelProperty(value = "参数")
    private T param;

}
